package com.atguigu04.override.test1;

/**
 * ClassName: OrderTest
 * Package: com.atguigu04.override.test1
 * Description:
 *
 * @Author 姜
 * @Create 2023/11/21 17:47
 * @Version 1.0
 */
public class OrderTest {
    public void method1() {
        Order order = new Order();
        // 通过对象调用Order类中声明的属性、方法
        order.orderDefault = 2;
        order.orderProtected = 2;
        order.orderPublic = 2;

        order.methodDefault();
        order.methodProtected();
        order.methodPublic();

        // 受封装性的影响，不能调用
//        order.orderPrivate = 1;
//        order.methodPrivate();
    }
}
